package com.loukou.lkt.lkt.enums;


public enum StockOutOrderTypeEnum {

	//0销售订单 2采购退货  5调拨'
	TYPE_SALE(0, "销售订单"),
	
	TYPE_RETURN_GOODS( 2, "采购退货" ),
	
	TYPE_AllOCATION( 5, "调拨" ),
	
	TYPE_CHECK( 6, "盘亏出库" );
	
	private int type;
	private String comment;
	
	StockOutOrderTypeEnum( int type, String comment) {
		this.type = type;
		this.comment = comment;
	}
	
	public int getType() {
		return type;
	}
	
	public void setType(int type) {
		this.type = type;
	}
	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}
	
	public static StockOutOrderTypeEnum parseEnum(int type) {
		for (StockOutOrderTypeEnum typeEnum : StockOutOrderTypeEnum.values()) {
			if(typeEnum.type == type){
				return typeEnum;
			}
		}
		return TYPE_AllOCATION;
	}
}
